#!/bin/bash
set -x 
function add_go_fastdfs_server(){
    if [ -z ${DEPEND_SERVICE} ];then
        echo "there is no go-fastdfs on my back,exiting"
        exit 1
    fi  
    go_fastdfs_server=${DEPEND_SERVICE%%:*}
    sed -i "s/GO_FASTDFS_ALIAS/${go_fastdfs_server}/g" /etc/nginx/nginx.conf
}

add_go_fastdfs_server